﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="ClockMagnet.UserControl1"
	x:Name="UserControl"
	d:DesignWidth="640" d:DesignHeight="480" Width="150" Height="150" xmlns:ClockMagnet_Converters="clr-namespace:ClockMagnet.Converters" xmlns:ClockMagnet="clr-namespace:ClockMagnet">

	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="Clock.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			<ClockMagnet_Converters:HourToDegree x:Key="HourToDegree"/>
			<ClockMagnet_Converters:MinuteToDegree x:Key="MinuteToDegree"/>
			<ClockMagnet_Converters:SecondToDegree x:Key="SecondToDegree"/>
			<ObjectDataProvider x:Key="ClockEngineDS" ObjectType="{x:Type ClockMagnet:ClockEngine}" d:IsDataSource="True"/>
		</ResourceDictionary>
	</UserControl.Resources>
	<Border x:Name="_root" Background="{DynamicResource Background}">
		<Grid x:Name="_rootGrid">
			<Rectangle Fill="#FF313131" Stroke="{x:Null}" VerticalAlignment="Bottom" Height="59" HorizontalAlignment="Center" Width="0.5" Margin="0.5,0,0,66" x:Name="_seconds" RenderTransformOrigin="0.5,0.85">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="{Binding Path=Second, Converter={StaticResource SecondToDegree}, Mode=Default, Source={StaticResource ClockEngineDS}}"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle Fill="#FF313131" Stroke="{x:Null}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="1" Height="50" Margin="0.5,0,0,50" x:Name="_minutes" RenderTransformOrigin="0.5,1">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="{Binding Path=TotalMinutes, Converter={StaticResource MinuteToDegree}, Mode=Default, Source={StaticResource ClockEngineDS}}"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle Fill="#FF313131" Stroke="{x:Null}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="1" Height="34" Margin="0.5,0,0,34" x:Name="_hours" RenderTransformOrigin="0.5,1">
					<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="{Binding Path=TotalMinutes, Converter={StaticResource HourToDegree}, Mode=OneWay, Source={StaticResource ClockEngineDS}}"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Border Background="{DynamicResource Reflection}" Margin="11.4,-3,16,23.565"/>
		</Grid>
	</Border>
</UserControl>